 DingTalkPC.device.notification.alert({
                        message: "测试弹窗",
                        title: "提示",//可传空
                        buttonName: "收到",
                        onSuccess: function () {
                            /*回调*/
                        },
                        onFail: function (err) { }
                    });

dd.config({
    agentId: _config.agentId,
    corpId: _config.corpId,
    timeStamp: _config.timeStamp,
    nonceStr: _config.nonceStr,
    signature: _config.signature,
    jsApiList: [
        'runtime.info',
        'device.notification.prompt',
        'biz.chat.pickConversation',
        'device.notification.confirm',
        'device.notification.alert',
        'device.notification.prompt',
        'biz.chat.open',
        'biz.util.open',
        'biz.user.get',
        'biz.contact.choose',
        'biz.telephone.call',
        'biz.ding.post',
        'device.geolocation.get',
        'biz.navigation.setLeft',
        'biz.navigation.close',
        'ui.pullToRefresh.disable',
    ]
});

Util.log("End dd config", location.href.substring(location.href.lastIndexOf('/')+1));
Util.log("Before dd ready", location.href.substring(location.href.lastIndexOf('/')+1));
dd.ready(function () {
//    alert("dd ready");
    dd.runtime.info({
        onSuccess: function (info) {
            Util.log("dd ready runtime success", location.href.substring(location.href.lastIndexOf('/')+1));
        },
        onFail: function (err) {
            Util.log("dd ready runtime failed", location.href.substring(location.href.lastIndexOf('/')+1));
        }
    });
    setTimeout(dd.runtime.permission.requestAuthCode({
        corpId: _config.corpId,
        onSuccess: function (info) {
            logger.i('authcode: ' + info.code);
            Util.log("dd ready requestAuthCode success", location.href.substring(location.href.lastIndexOf('/')+1));
            dd.ui.pullToRefresh.disable();
            $.ajax({
                url: '/authUser',
                type: "GET",
                data: {"access_token": _config.token, "code": info.code},
                dataType: 'json',
                timeout: 9000,
                success: function (data, status, xhr) {
                    Util.log("dd ready ajax success", location.href.substring(location.href.lastIndexOf('/')+1));
                },
                error: function (xhr, errorType, error) {
                    Util.log("dd ready ajax failed", location.href.substring(location.href.lastIndexOf('/')+1));
                }
            });
        },
        onFail: function (err) {
            Util.log("dd ready requestAuthCode failed", location.href.substring(location.href.lastIndexOf('/')+1));
        }
    }), 10000);
});

